package com.conv.shop.business.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ShoppingCartExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ShoppingCartExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andShoppingCartIdIsNull() {
            addCriterion("shopping_cart_id is null");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdIsNotNull() {
            addCriterion("shopping_cart_id is not null");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdEqualTo(Integer value) {
            addCriterion("shopping_cart_id =", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdNotEqualTo(Integer value) {
            addCriterion("shopping_cart_id <>", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdGreaterThan(Integer value) {
            addCriterion("shopping_cart_id >", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("shopping_cart_id >=", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdLessThan(Integer value) {
            addCriterion("shopping_cart_id <", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdLessThanOrEqualTo(Integer value) {
            addCriterion("shopping_cart_id <=", value, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdIn(List<Integer> values) {
            addCriterion("shopping_cart_id in", values, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdNotIn(List<Integer> values) {
            addCriterion("shopping_cart_id not in", values, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdBetween(Integer value1, Integer value2) {
            addCriterion("shopping_cart_id between", value1, value2, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andShoppingCartIdNotBetween(Integer value1, Integer value2) {
            addCriterion("shopping_cart_id not between", value1, value2, "shoppingCartId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdIsNull() {
            addCriterion("consumer_id is null");
            return (Criteria) this;
        }

        public Criteria andConsumerIdIsNotNull() {
            addCriterion("consumer_id is not null");
            return (Criteria) this;
        }

        public Criteria andConsumerIdEqualTo(Integer value) {
            addCriterion("consumer_id =", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdNotEqualTo(Integer value) {
            addCriterion("consumer_id <>", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdGreaterThan(Integer value) {
            addCriterion("consumer_id >", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("consumer_id >=", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdLessThan(Integer value) {
            addCriterion("consumer_id <", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdLessThanOrEqualTo(Integer value) {
            addCriterion("consumer_id <=", value, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdIn(List<Integer> values) {
            addCriterion("consumer_id in", values, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdNotIn(List<Integer> values) {
            addCriterion("consumer_id not in", values, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdBetween(Integer value1, Integer value2) {
            addCriterion("consumer_id between", value1, value2, "consumerId");
            return (Criteria) this;
        }

        public Criteria andConsumerIdNotBetween(Integer value1, Integer value2) {
            addCriterion("consumer_id not between", value1, value2, "consumerId");
            return (Criteria) this;
        }

        public Criteria andNumberIsNull() {
            addCriterion("`number` is null");
            return (Criteria) this;
        }

        public Criteria andNumberIsNotNull() {
            addCriterion("`number` is not null");
            return (Criteria) this;
        }

        public Criteria andNumberEqualTo(Integer value) {
            addCriterion("`number` =", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotEqualTo(Integer value) {
            addCriterion("`number` <>", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThan(Integer value) {
            addCriterion("`number` >", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("`number` >=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThan(Integer value) {
            addCriterion("`number` <", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThanOrEqualTo(Integer value) {
            addCriterion("`number` <=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberIn(List<Integer> values) {
            addCriterion("`number` in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotIn(List<Integer> values) {
            addCriterion("`number` not in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberBetween(Integer value1, Integer value2) {
            addCriterion("`number` between", value1, value2, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("`number` not between", value1, value2, "number");
            return (Criteria) this;
        }

        public Criteria andSelectedIsNull() {
            addCriterion("selected is null");
            return (Criteria) this;
        }

        public Criteria andSelectedIsNotNull() {
            addCriterion("selected is not null");
            return (Criteria) this;
        }

        public Criteria andSelectedEqualTo(Integer value) {
            addCriterion("selected =", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedNotEqualTo(Integer value) {
            addCriterion("selected <>", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedGreaterThan(Integer value) {
            addCriterion("selected >", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedGreaterThanOrEqualTo(Integer value) {
            addCriterion("selected >=", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedLessThan(Integer value) {
            addCriterion("selected <", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedLessThanOrEqualTo(Integer value) {
            addCriterion("selected <=", value, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedIn(List<Integer> values) {
            addCriterion("selected in", values, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedNotIn(List<Integer> values) {
            addCriterion("selected not in", values, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedBetween(Integer value1, Integer value2) {
            addCriterion("selected between", value1, value2, "selected");
            return (Criteria) this;
        }

        public Criteria andSelectedNotBetween(Integer value1, Integer value2) {
            addCriterion("selected not between", value1, value2, "selected");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeIsNull() {
            addCriterion("add_to_cart_time is null");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeIsNotNull() {
            addCriterion("add_to_cart_time is not null");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeEqualTo(Date value) {
            addCriterion("add_to_cart_time =", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeNotEqualTo(Date value) {
            addCriterion("add_to_cart_time <>", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeGreaterThan(Date value) {
            addCriterion("add_to_cart_time >", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("add_to_cart_time >=", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeLessThan(Date value) {
            addCriterion("add_to_cart_time <", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeLessThanOrEqualTo(Date value) {
            addCriterion("add_to_cart_time <=", value, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeIn(List<Date> values) {
            addCriterion("add_to_cart_time in", values, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeNotIn(List<Date> values) {
            addCriterion("add_to_cart_time not in", values, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeBetween(Date value1, Date value2) {
            addCriterion("add_to_cart_time between", value1, value2, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andAddToCartTimeNotBetween(Date value1, Date value2) {
            addCriterion("add_to_cart_time not between", value1, value2, "addToCartTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeIsNull() {
            addCriterion("last_update_time is null");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeIsNotNull() {
            addCriterion("last_update_time is not null");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeEqualTo(Date value) {
            addCriterion("last_update_time =", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeNotEqualTo(Date value) {
            addCriterion("last_update_time <>", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeGreaterThan(Date value) {
            addCriterion("last_update_time >", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("last_update_time >=", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeLessThan(Date value) {
            addCriterion("last_update_time <", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("last_update_time <=", value, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeIn(List<Date> values) {
            addCriterion("last_update_time in", values, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeNotIn(List<Date> values) {
            addCriterion("last_update_time not in", values, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("last_update_time between", value1, value2, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andLastUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("last_update_time not between", value1, value2, "lastUpdateTime");
            return (Criteria) this;
        }

        public Criteria andProductIdIsNull() {
            addCriterion("product_id is null");
            return (Criteria) this;
        }

        public Criteria andProductIdIsNotNull() {
            addCriterion("product_id is not null");
            return (Criteria) this;
        }

        public Criteria andProductIdEqualTo(Integer value) {
            addCriterion("product_id =", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotEqualTo(Integer value) {
            addCriterion("product_id <>", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThan(Integer value) {
            addCriterion("product_id >", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("product_id >=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThan(Integer value) {
            addCriterion("product_id <", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdLessThanOrEqualTo(Integer value) {
            addCriterion("product_id <=", value, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdIn(List<Integer> values) {
            addCriterion("product_id in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotIn(List<Integer> values) {
            addCriterion("product_id not in", values, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdBetween(Integer value1, Integer value2) {
            addCriterion("product_id between", value1, value2, "productId");
            return (Criteria) this;
        }

        public Criteria andProductIdNotBetween(Integer value1, Integer value2) {
            addCriterion("product_id not between", value1, value2, "productId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}